package com.sram.service;

import com.sram.dao.UserDao;
import com.sram.entity.User;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate4.HibernateTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.*;

/**
 * Created by Administrator on 2017/2/17.
 */
@Service("userService")
public class UserService extends BaseService{
    @Resource
    private UserDao userDao;
    @Resource
    private UserService userService;
    public List<User>  getUserByName(String name ,String pwd){
        //sql返回实体
        List<User> users = userDao.getUserByName2(name,pwd);
        //sql返回map
//        List<Map<String,String>> users = userDao.getUserByName3(name,pwd);
//        for(Map s :users){
//            System.out.printf(s.get("name").toString());
//        }
        return null;
    }
}
